<?php

namespace api\know\service;

use api\know\model\UserModel;
use think\db\Query;

class WxUserService
{

    public function login($param)
    {
        $paramArr = [
            'appid' => 'wx44207b152078fe14', 
            'secret' => 'f8a8422791cdc3ea75c2d288635c63c4', 
            'js_code' => $param['code'], 
            'grant_type' => 'authorization_code'
        ];
        $res = file_get_contents('https://api.weixin.qq.com/sns/jscode2session?' . http_build_query($paramArr));
        

        return $res;
    }

    

}